package com.chao.yygh.hosp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chao.yygh.hosp.mapper.HospitalSetMapper;
import com.chao.yygh.hosp.service.HospitalSetService;
import com.chao.yygh.model.hosp.HospitalSet;
import org.springframework.stereotype.Service;

/**
 * @author WangChao
 * @version 1.0
 * @date 2023/3/8 10:50
 */
@Service
public class HospitalSetServiceImpl extends ServiceImpl<HospitalSetMapper, HospitalSet> implements HospitalSetService {

    @Override
    public String getSignKey(String hosCode) {
        QueryWrapper<HospitalSet> query = new QueryWrapper<>();
        query.eq("hoscode",hosCode);
        HospitalSet hospitalSet = baseMapper.selectOne(query);
        return hospitalSet.getSignKey();
    }
}
